<template>
  <n-space vertical>
    <UserOrLogin/>
    <Search @updateTasks="updateTodoList"/>
    <PublicTodo/>
  </n-space>
</template>

<script setup>
import {defineAsyncComponent, onMounted, provide, reactive, ref} from "vue";
import {getTaskStatusEnum} from "../api/commonApi.js";
import UserOrLogin from "../components/common/UserOrLogin.vue";

const Search = defineAsyncComponent(() =>
    import("../components/task/SearchTask.vue")
)
const PublicTodo = defineAsyncComponent(() =>
    import("../components/task/PublicTodo.vue")
)
const todoList = ref([])


provide('todoList', todoList)

function updateTodoList(tasks) {
  todoList.value = tasks
}


</script>

<style scoped>
.today-todo {
  width: 300px;
}
</style>